package com.jinhongone.pattern.behavior.strategy;

/**
 * @author jinho
 * @className Test
 * @description 测试类
 * @date 2025/3/28 10:53
 */
public class Test {

    public static void main(String[] args) {
        //根据不同节日，切换不同销售策略
        //春节销售策略
        SaleMan saleMan = new SaleMan(new StrategyA());
        saleMan.saleStrage();
        System.out.println("=============================");
        //元宵节销售策略
        saleMan.setStrategy(new StrategyB());
        saleMan.saleStrage();
        System.out.println("=============================");
        //春至销售策略
        saleMan.setStrategy(new StrategyC());
        saleMan.saleStrage();
    }
}
